package com.taotao.pojo;

import java.io.Serializable;
import java.util.Date;

/**
 * 内容
 */
public class Content implements Serializable{
    private static final long serialVersionUID = -8477154463606490533L;
    private Long id;
    /**
     * 内容类目ID
     */
    private Long categoryId;
    /**
     * 内容标题
     */
    private String title;
    /**
     * 子标题
     */
    private String subTitle;
    /**
     * 标题描述
     */
    private String titleDesc;
    /**
     * 链接
     */
    private String url;
    /**
     * 图片路径
     */
    private String pic;
    /**
     * 图片路径2
     */
    private String pic2;

    private Date created;

    private Date updated;
    /**
     * 内容
     */
    private String content;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSubTitle() {
        return subTitle;
    }

    public void setSubTitle(String subTitle) {
        this.subTitle = subTitle;
    }

    public String getTitleDesc() {
        return titleDesc;
    }

    public void setTitleDesc(String titleDesc) {
        this.titleDesc = titleDesc;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    public String getPic2() {
        return pic2;
    }

    public void setPic2(String pic2) {
        this.pic2 = pic2;
    }

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    public Date getUpdated() {
        return updated;
    }

    public void setUpdated(Date updated) {
        this.updated = updated;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Content content1 = (Content) o;

        if (id != null ? !id.equals(content1.id) : content1.id != null) return false;
        if (categoryId != null ? !categoryId.equals(content1.categoryId) : content1.categoryId != null) return false;
        if (title != null ? !title.equals(content1.title) : content1.title != null) return false;
        if (subTitle != null ? !subTitle.equals(content1.subTitle) : content1.subTitle != null) return false;
        if (titleDesc != null ? !titleDesc.equals(content1.titleDesc) : content1.titleDesc != null) return false;
        if (url != null ? !url.equals(content1.url) : content1.url != null) return false;
        if (pic != null ? !pic.equals(content1.pic) : content1.pic != null) return false;
        if (pic2 != null ? !pic2.equals(content1.pic2) : content1.pic2 != null) return false;
        if (created != null ? !created.equals(content1.created) : content1.created != null) return false;
        if (updated != null ? !updated.equals(content1.updated) : content1.updated != null) return false;
        return content != null ? content.equals(content1.content) : content1.content == null;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (categoryId != null ? categoryId.hashCode() : 0);
        result = 31 * result + (title != null ? title.hashCode() : 0);
        result = 31 * result + (subTitle != null ? subTitle.hashCode() : 0);
        result = 31 * result + (titleDesc != null ? titleDesc.hashCode() : 0);
        result = 31 * result + (url != null ? url.hashCode() : 0);
        result = 31 * result + (pic != null ? pic.hashCode() : 0);
        result = 31 * result + (pic2 != null ? pic2.hashCode() : 0);
        result = 31 * result + (created != null ? created.hashCode() : 0);
        result = 31 * result + (updated != null ? updated.hashCode() : 0);
        result = 31 * result + (content != null ? content.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "Content{" +
                "id=" + id +
                ", categoryId=" + categoryId +
                ", title='" + title + '\'' +
                ", subTitle='" + subTitle + '\'' +
                ", titleDesc='" + titleDesc + '\'' +
                ", url='" + url + '\'' +
                ", pic='" + pic + '\'' +
                ", pic2='" + pic2 + '\'' +
                ", created=" + created +
                ", updated=" + updated +
                ", content='" + content + '\'' +
                '}';
    }
}